package la.iok.hzsvn.lewin.movie.shopmovie.model;

import la.iok.hzsvn.lewin.movie.core.model.UserVo;
import la.iok.hzsvn.lewin.movie.shopmovie.entity.Coupon;
import org.apache.tomcat.jni.User;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

public class EfficacyCouponVo extends UserVo
{

    private List<Coupon> Coupons;


    public EfficacyCouponVo(List<Coupon> Coupons)
    {
        this.Coupons=Coupons;
    }
    public EfficacyCouponVo(UserVo vo)
    {
        this.Coupons=new ArrayList<>();
        this.setId(vo.getId());
        this.setGender(vo.getGender());
        this.setDisabled(vo.getDisabled());
        this.setNickname(vo.getNickname());
        this.setCoverFileId(vo.getCoverFileId());
        this.setHideCloudMovie(vo.getHideCloudMovie());
        this.setDisabled(vo.getDisabled());
        this.setOrgUnitId(vo.getOrgUnitId());
        this.setOrgUnitName(vo.getOrgUnitName());
        this.setOrgUnitType(vo.getOrgUnitType());
        this.setPhoneNumber(vo.getPhoneNumber());
        this.setRegChannel(vo.getRegChannel());
        this.setRegisterTime(vo.getRegisterTime());
        this.setRoles(vo.getRoles());
    }
    public List<Coupon> getCoupons() {
        return Coupons;
    }

    public void setCoupons(List<Coupon> coupons) {
        Coupons = coupons;
    }

    public void addCoupon(Coupon coupons) {
        Coupons.add(coupons);
    }


    @Override
    public String toString() {
        return "UserVo{" +
                "userId=" + getId() +
                ", userNickname='" + getNickname() + '\'' +
                ", userPhoneNumber='" + getPhoneNumber() + '\'' +
                ", userGender=" + getGender() +
                '}'+"Coupons{"+Coupons.stream().toString();
    }
}
